//
//  MyRenWuViewController.m
//  ShouYi
//
//  Created by yurui on 16/3/11.
//  Copyright © 2016年 yurui. All rights reserved.
//

#import "MyRenWuViewController.h"
#import "MyRenWuTableViewCell.h"
@interface MyRenWuViewController ()<UITableViewDataSource,UITableViewDelegate>
@property(nonatomic,strong) UITableView *tableView;
@end

@implementation MyRenWuViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"我的任务";
    // Do any additional setup after loading the view.
    [self configerTableView];
}

- (void)configerTableView{
    self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 10, kWidth, kHeight) style:UITableViewStylePlain];
    [self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    [self.tableView registerClass:[MyRenWuTableViewCell class] forCellReuseIdentifier:@"cell"];
    self.tableView.backgroundColor = kViewBackColor;
    [self.view addSubview:_tableView];
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 90;
}

- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 5;
}
- (NSInteger) numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    MyRenWuTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
    cell.backgroundColor = kViewBackColor;
    cell.contentImageView.image = [UIImage imageNamed:@"img_touxxxxx"];
    cell.addressImageView .image = [UIImage imageNamed:@"icon_di.png"];
    cell.addressLabel.text = @"杭州本地";
    cell.titalNumLabel.text = @"61000";
    cell.titleLabel.text = @"你在南方的艳阳里大雪纷飞，我在北方的寒夜里四季如春。";
    cell.styleImageView.image = [UIImage imageNamed:@"icon_jx.png"];
    
    return cell;
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
